<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>怪异盒模型</title>
    <style>
        .box1{
            width: 200px;
            height: 200px;
            background: yellow;
            padding: 30px;
            border: 10px solid red;
            /*border+padding+content=宽和高*/
            box-sizing: border-box;
        }
        .box2{
            width: 200px;
            height: 200px;
            background: red;
            margin-top: 100px;
            padding: 30px;
            border: 10px solid yellow;
        }
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>
</body>
</html>